package pri.ydy.eduService.controller;

import org.springframework.web.bind.annotation.*;
import pri.ydy.commonUtils.R;

/**
 * @author Ydy
 * @date 2020/10/3 - 16:25
 */
@RestController
@RequestMapping("/eduservice/user")
public class EduLoginController {

    //login方法
    @PostMapping("login")
    public R login() {
        return R.ok().data("token", "admin");
    }

    //getInfo方法
    @GetMapping("info")
    public R getInfo() {
        return R.ok().data("roles", "[admin]").data("name", "admin").data("avatar", "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1601790342306&di=7d40ac6ae52fdc99ee82e8108f1da01c&imgtype=0&src=http%3A%2F%2Fb-ssl.duitang.com%2Fuploads%2Fitem%2F201512%2F22%2F20151222223118_tnvcX.thumb.700_0.jpeg");
    }


}
